using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using mvLibrary.Helpers.Utils;

namespace fenk.Admin.Bancos
{
    public partial class DepPend : mvLibrary.BaseForm
    {
        public DepPend()
        {
            InitializeComponent();
        }
        public override void BeforeSaveItem()
        {
            // si se depositan cheques, totales efectivo y tarjetas quedan en cero...
            if (UniItem.Extract(3,1,1).IsNotEmpty() )
            {
                UniItem.Replace(5,string.Empty);// tarjeta nombre
                UniItem.Replace(6,string.Empty);// tarjeta importe
                UniItem.Replace(7,string.Empty);// efectivo importe
            }
            // deposito de tarjetas....
            if (UniItem.Extract(5).IsNotEmpty())
            {
                UniItem.Replace(7,string.Empty);// efectivo
            }
        }

        private void mvTextBox3_TextChanged(object sender, EventArgs e)
        {

        }

        

        private void mvDataGridView1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
        {
            if (e.ColumnIndex == 0 & e.FormattedValue.ToString() == "0")
            {
               string importe =  Microsoft.VisualBasic.Interaction.InputBox("Importe:", "Buscar cheques pendientes","",400,250);
               UniItem.Replace(20, importe);
                
            }
        }
    }
}

